package com.zm.devmag.device.dao;

import com.zm.devmag.device.po.Category;


import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@Repository
public interface CategoryMapper {

	//根据id删除用户
    int deleteByPrimaryKey(Long id);

    int insertSelective(Category record);
 
    //通过id查看用户
    Category selectByPrimaryKey(Long id);
    
    int updateByPrimaryKeySelective(Category record);
	List<Category> findAll();
	List<Category> findCategroyByName(String name);
	//当前最的Id值
	Long getMaxIdValue();
	//批量插入
	int insertCategoryBatch(@Param("list") List clist);
	List<Category> getCategroyByCtype(String ctype);
	int selectSubCataCountBySid(Long sid);
	List<Category> selectChildCateByPid(Long pid);
}